import {Meta} from '@storybook/addon-docs/blocks';

<Meta title="Composables/useApp" />

# useApp

`useApp` purpose is to expose `pkp.context` information about current context to avoid accessing it directly. Including whether running app is OJS/OPS/OMP.

## Examples

### Conditional Rendering Based on Application

```js
const {isOPS} = useApp();
function getGalleyGridComponent() {
	if (isOPS()) {
		return 'grid.preprintGalleys.PreprintGalleyGridHandler';
	} else {
		return 'grid.articleGalleys.ArticleGalleyGridHandler';
	}
}
```
